//创建一个 10 步的进度条，每 100 毫秒完成一步
const ProgressBar=require('progress')

const bar=new ProgressBar(':bar',{total:100})
const timer=setInterval(()=>{
    bar.tick()
    if(bar.complete){
        clearInterval(timer)
    }
},100)